package com.htdc.web.dao;

import com.htdc.web.bean.Room;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: Sfx
 * Date: 2018/9/5 0005
 * Time: 上午 10:48
 * To change this template use File | Settings | File Templates.
 */
public interface RoomDao {
    //添加房源
    public void addRoom(@Param("rname") String rname, @Param("roomArea") double roomArea, @Param("roomRealArea") double roomRealArea, @Param("pid") long pid, @Param("state") String state, @Param("cid") int cid);
    //添加房源后更改项目总面积
    public void updateProjectTotalArea(@Param("totalArea") double totalArea, @Param("totalRealArea") double totalRealArea, @Param("pid") long pid);

    //根据rid 获取房间信息
    public Room getRoomByRid(int rid);

    //根据pid 获取所有房间资源
    public List<Room> getRoomsByPid(@Param("pid") int pid);

    //获取所有未出租的房屋信息
    public List<Room> getUnrentRooms();
    //修改房源信息
    public void changeRoom(@Param("roomArea") double roomArea, @Param("roomRealArea") double roomRealArea, @Param("rname") String rname, @Param("rid") int rid);


}
